//2009/07/20 17:47:13
#include<iostream>
#include<vector>
#include<string>

using namespace std;

class BinaryCode
{
public:
    vector <string> decode(string message)
    {
        vector<string> pp;
        pp.push_back(p0(message));
        pp.push_back(p1(message));
        return pp;
    }
private:
    string p0(string message)
    {
		int N = message.size();
		string p;
		p += "0";
		if(N == 1)
		{
			if(message.compare("0") == 0)
				return "0";
			else 
				return "NONE";
		}
		char next = message[0] - p[0] + 48; // Take care with the difference between '0' and 0;
		for(int i=1; i< N; i++)
		{
			if(next!='0' && next!='1')
				return "NONE";
			else
				p += next;
			next = message[i] - p[i] - p[i-1] + 48*2;
		}
		if(p[N-1] + p[N-2] - '0' != message[N-1])
			return "NONE";
		return p;
    }
    string p1(string message)
    {
		int N = message.size();
		string p;
		p += "1";
		if(N == 1)
		{
			if(message.compare("1") == 0)
				return "1";
			else 
				return "NONE";
		}
		char next = message[0] - p[0] + 48;
		for(int i=1; i< N; i++)
		{
			if(next!='0' && next!='1')
				return "NONE";
			else
				p += next;
			next = message[i] - p[i] - p[i-1] + 48*2;
		}
		if(p[N-1] + p[N-2] - '0' != message[N-1])
			return "NONE";
		return p;
    }
};
